{{ define "content" }}
<div class="container">

    <div class="col-md-12 mx-auto">
        <div class="card shadow card-body">
            <h2 class="text-left mb-6">Generate Client</h2>
            <hr>
            <div class="container-fluid py-3">
                <form id="generate-form">
                    <div class="messages"></div>
                    <div class="controls">
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label for="address">Server Address *</label>
                                    <input id="address" type="text" name="address" class="form-control"
                                           placeholder="Server Address" required="required"
                                           data-error="Server address required." value={{.Address}}>
                                    <div class="help-block with-errors"></div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label for="port">Server Port</label>
                                    <input id="port" type="text" name="port" class="form-control"
                                           placeholder="Optional server port" value={{.Port}}>
                                    <div class="help-block with-errors"></div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label for="filename">Filename</label>
                                    <input id="filename" type="tel" name="filename" class="form-control"
                                           placeholder="Optional filename">
                                    <div class="help-block with-errors"></div>
                                </div>
                            </div>
                            <div class="form-group col-md-4">
                                <label for="os_target">OS Target *</label>
                                <select id="os_target" class="form-control" name="os_target" size="0">
                                    {{ range $key, $value := .OSTarget}}
                                    <option value="{{$key}}">{{$value}}</option>
                                    {{- end}}
                                </select>
                            </div>
                            <div class="form-group col-md-2">
                                <label class="mb-3">Run Hidden</label>
                                <div class="form-check form-check-inline">
                                    <input id="run_hidden" class="form-check-input" type="checkbox" data-toggle="toggle"
                                           data-style="mr-1" data-size="xs">
                                    <label for="run_hidden" class="form-check-label"></label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="clearfix"></div>

                    <div class="row">
                        <div class="col-md-12">
                            <button class="btn btn-primary btn-send" onclick="GenerateBinary()">Build</button>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <p class="text-muted"><strong>*</strong> These fields are required.</p>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script src="static/js/app/generate.js"></script>
{{ end }}